Skip to content

optimistic_yield() #551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 16, 2015
Merged

optimistic_yield() #551

merged 3 commits into from
Jul 16, 2015

Conversation

Makuna
Copy link
Collaborator

@Makuna Makuna commented Jul 13, 2015

this introduces optimistic_yield() used for when standard library
methods are normally used in tight loops waiting for something to
happen, like available().

this replaces #545

this introduces optimistic_yield() used for when standard library
methods are normally used in tight loops waiting for something to
happen, like available().
@Links2004
Copy link
Collaborator

I like the ISR check.
one question you add at all files extern "C" void optimistic_yield(); is there a reason for this?
i think its better to add it to the header file like the yield() or is there a problem that i don't see?

remove extern from cpp files
@Makuna
Copy link
Collaborator Author

Makuna commented Jul 15, 2015

@Links2004 (fixed) I meant to look into that but I was just following what was already done.

@igrr
Copy link
Member

igrr commented Jul 16, 2015

That's a good addition, thank you.
I also think of moving this check into yield() itself, because that would make it more robust. Additionally esp_yield needs an additional check to see if it is being executed from sketch context (as opposed to system task).

igrr added a commit that referenced this pull request Jul 16, 2015
@igrr igrr merged commit 6e23468 into esp8266:esp8266 Jul 16, 2015
@Makuna Makuna deleted the availbleYield branch July 20, 2015 17:42
igrr added a commit that referenced this pull request Oct 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants